package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/**
 * 员工实体类
 */
@TableName("t_employee")
public class EmployeeBean {
    @TableId(value = "pk_emId",type = IdType.AUTO)
    private int id;
    @TableField("e_name")
    private String name;
    @TableField("e_job")
    private String job;
    @TableField("e_birthday")
    private LocalDate birthday;
    @TableField("fk_deptId")
    private int deptId;
    @TableField(exist = false)
    private DeptBean dept;

    public EmployeeBean() {
    }

    public EmployeeBean(String name, String job, LocalDate birthday, int deptId) {
        this.name = name;
        this.job = job;
        this.birthday = birthday;
        this.deptId = deptId;
    }

    public EmployeeBean(String name, String job, LocalDate birthday) {
        this.name = name;
        this.job = job;
        this.birthday = birthday;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public int getDeptId() {
        return deptId;
    }

    public void setDeptId(int deptId) {
        this.deptId = deptId;
    }

    public DeptBean getDept() {
        return dept;
    }

    public void setDept(DeptBean dept) {
        this.dept = dept;
    }
}
